//
//  PhotoCell.m
//  Pacific_Computer
//
//  Created by 范琦 on 14-12-17.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "PhotoCell.h"
#import "UIColor+AddColor.h"

@implementation PhotoCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.myImage = [[UIImageView alloc] init];
        [self.contentView addSubview:self.myImage];
        [_myImage release];
        
        self.titleLabel = [[UILabel alloc] init];
        self.titleLabel.font = [UIFont systemFontOfSize:16];
        self.titleLabel.textColor = [UIColor blackColor];
        [self.contentView addSubview:self.titleLabel];
        [_titleLabel release];
        
        self.numLabel = [[UILabel alloc] init];
        self.numLabel.font = [UIFont systemFontOfSize:16];
        self.numLabel.textColor = [UIColor shenhuiseColor];
        [self.contentView addSubview:self.numLabel];
        [_numLabel release];
        
        
    }
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    self.myImage.frame = CGRectMake(self.contentView.bounds.size.width / 50, self.contentView.bounds.size.height * 4.3 / 100, self.contentView.bounds.size.width - 2 * (self.contentView.bounds.size.width / 50), self.contentView.bounds.size.height * 87 / 100 - (self.contentView.bounds.size.height * 4.3 / 100));
    
    self.titleLabel.frame = CGRectMake(self.contentView.bounds.size.width * 1.3 / 50, self.contentView.bounds.size.height * 87 / 100, self.contentView.bounds.size.width * 43.3 / 50, self.contentView.bounds.size.height * 13 / 100);
    
    self.numLabel.frame = CGRectMake(self.contentView.bounds.size.width * 43.3 / 50, self.contentView.bounds.size.height * 87 / 100, self.contentView.bounds.size.width * 2 / 25, self.contentView.bounds.size.height * 13 / 100);
}



- (void)dealloc
{
    [_titleLabel release];
    [_numLabel release];
    [_myImage release];
    [super dealloc];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
